AutoDispatch = function(A) {
	if (!A)
		return;
	this.initConfig(A);
}
AutoDispatch.prototype = {
	factory : [],
	taksLoad:[],
	initConfig : function(A) {
		if (A.factory)
			this.factory = A.factory;
		if (A.taskLoad)
			this.taskLoad = A.taskLoad;
	},
	run:function()
	{
		this.generateLoad(this.factory);

			for(var i=0;i<this.taskLoad.length;i++)
			{
				var task=this.taskLoad[i];
				for(var j=0;j<this.factory.length;j++)
				{
					if(task<this.loadLeft[j])
					{
						
					}
				}
				//
			}

	},
	checkValid:function(A,B)
	{
		if(A.length==B.length&&B.length==C.length)
		{
			for(var i=0;i<A.length;i++)
			{
				this.loadLeft[i]=B[i]-C[i];
			}
			return true;
		}
		else
			return false;
	}
};